﻿#include"Stack.h"
void STJudge(ST* ps)
{
	if (STEmpty(ps))
		printf("为空！\n");
	else
		printf("不为空！\n");
}
void solve()
{
	ST stack;
	STInit(&stack);
	for (int i = 1; i <= 5; i++)
	{
		STPush(&stack, 2 * i - 1);
		printf("%d ", STTop(&stack));
	}
	printf("\n");
	STDestroy(&stack);
	STJudge(&stack);
	for (int i = 1; i <= 5; i++)
	{
		STPush(&stack, 2 * i);
		printf("%d ", STTop(&stack));
	}
	printf("\n");
	STJudge(&stack);
	for (int i = 1; i <= 5; i++)
	{
		printf("%d ", STTop(&stack));
		STPop(&stack);
	}
	printf("\n");
	STJudge(&stack);
}
int main()
{
	solve();
	return 0;
}